package com.yunji.web.common;

import com.yunji.common.base.BaseController;
import com.yunji.common.base.response.Response;
import com.yunji.common.base.response.ResponseHelper;
import com.yunji.common.model.dto.SmsDTO;
import com.yunji.system.business.SmsBusiness;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Project: yunji-coffee
 * @Package: com.yunji.web.common
 * @Title: SmsController
 * <p>
 * History:
 * Date                     Version     Author          Summary
 * ============================================================
 * 2024-10-11 15:46:03      V1.0        HuaAo       新建类
 */
@Api(tags = "管理端-通用短信服务")
@RestController
@RequestMapping("/sms")
public class SmsController extends BaseController {

    @Resource
    SmsBusiness business;

    @ApiOperation("发送验证码")
    @PostMapping("/send")
    public Response<String> send(@RequestBody SmsDTO dto) {
        return ResponseHelper.success(business.send(dto));
    }

}